<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: libemb::Pollset Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>libemb</b></li><li class="navelem"><a class="el" href="classlibemb_1_1_pollset.html">Pollset</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="classlibemb_1_1_pollset-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libemb::Pollset Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>IO复用/轮询集  
 <a href="classlibemb_1_1_pollset.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_pollset_8h_source.html">Pollset.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a26b88c0d7dfb236271e7ba51569da90f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_pollset.html#a26b88c0d7dfb236271e7ba51569da90f">open</a> (int maxEvents, bool et=false)</td></tr>
<tr class="memdesc:a26b88c0d7dfb236271e7ba51569da90f"><td class="mdescLeft">&#160;</td><td class="mdescRight">打开复用集  <a href="classlibemb_1_1_pollset.html#a26b88c0d7dfb236271e7ba51569da90f">More...</a><br /></td></tr>
<tr class="separator:a26b88c0d7dfb236271e7ba51569da90f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f3243ca6bdc0932a9504197feba9eca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_pollset.html#a7f3243ca6bdc0932a9504197feba9eca">close</a> ()</td></tr>
<tr class="memdesc:a7f3243ca6bdc0932a9504197feba9eca"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭复用集  <a href="classlibemb_1_1_pollset.html#a7f3243ca6bdc0932a9504197feba9eca">More...</a><br /></td></tr>
<tr class="separator:a7f3243ca6bdc0932a9504197feba9eca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b9973507ab2d396f5e253d629f41356"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_pollset.html#a4b9973507ab2d396f5e253d629f41356">addEvent</a> (int fd, int event)</td></tr>
<tr class="memdesc:a4b9973507ab2d396f5e253d629f41356"><td class="mdescLeft">&#160;</td><td class="mdescRight">增加轮询事件  <a href="classlibemb_1_1_pollset.html#a4b9973507ab2d396f5e253d629f41356">More...</a><br /></td></tr>
<tr class="separator:a4b9973507ab2d396f5e253d629f41356"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64dcdbc9c139b72e5bbffc693978bf14"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_pollset.html#a64dcdbc9c139b72e5bbffc693978bf14">removeEvent</a> (int fd, int event)</td></tr>
<tr class="memdesc:a64dcdbc9c139b72e5bbffc693978bf14"><td class="mdescLeft">&#160;</td><td class="mdescRight">移除轮询事件  <a href="classlibemb_1_1_pollset.html#a64dcdbc9c139b72e5bbffc693978bf14">More...</a><br /></td></tr>
<tr class="separator:a64dcdbc9c139b72e5bbffc693978bf14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cf528f94f5826ee728649fd15e59d9f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_pollset.html#a9cf528f94f5826ee728649fd15e59d9f">waitEvent</a> (<a class="el" href="classlibemb_1_1_int_array.html">IntArray</a> &amp;fdArray, <a class="el" href="classlibemb_1_1_int_array.html">IntArray</a> &amp;eventArray, int usTimeout)</td></tr>
<tr class="memdesc:a9cf528f94f5826ee728649fd15e59d9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">等待事件  <a href="classlibemb_1_1_pollset.html#a9cf528f94f5826ee728649fd15e59d9f">More...</a><br /></td></tr>
<tr class="separator:a9cf528f94f5826ee728649fd15e59d9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a9a2bb330f547c34f67ee1eba5eb487ac"><td class="memItemLeft" align="right" valign="top"><a id="a9a2bb330f547c34f67ee1eba5eb487ac"></a>
static const int&#160;</td><td class="memItemRight" valign="bottom"><b>EventRead</b> = 0</td></tr>
<tr class="separator:a9a2bb330f547c34f67ee1eba5eb487ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37f037ab3399a97288830625372dcb64"><td class="memItemLeft" align="right" valign="top"><a id="a37f037ab3399a97288830625372dcb64"></a>
static const int&#160;</td><td class="memItemRight" valign="bottom"><b>EventWrite</b> = 1</td></tr>
<tr class="separator:a37f037ab3399a97288830625372dcb64"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>IO复用/轮询集 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a4b9973507ab2d396f5e253d629f41356"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b9973507ab2d396f5e253d629f41356">&#9670;&nbsp;</a></span>addEvent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::Pollset::addEvent </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>event</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>增加轮询事件 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td></td></tr>
    <tr><td class="paramname">event</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

</div>
</div>
<a id="a7f3243ca6bdc0932a9504197feba9eca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f3243ca6bdc0932a9504197feba9eca">&#9670;&nbsp;</a></span>close()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libemb::Pollset::close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>关闭复用集 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a26b88c0d7dfb236271e7ba51569da90f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26b88c0d7dfb236271e7ba51569da90f">&#9670;&nbsp;</a></span>open()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::Pollset::open </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxEvents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>et</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>打开复用集 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">maxEvents</td><td></td></tr>
    <tr><td class="paramname">et</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

</div>
</div>
<a id="a64dcdbc9c139b72e5bbffc693978bf14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64dcdbc9c139b72e5bbffc693978bf14">&#9670;&nbsp;</a></span>removeEvent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::Pollset::removeEvent </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>event</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>移除轮询事件 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td></td></tr>
    <tr><td class="paramname">event</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

</div>
</div>
<a id="a9cf528f94f5826ee728649fd15e59d9f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9cf528f94f5826ee728649fd15e59d9f">&#9670;&nbsp;</a></span>waitEvent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::Pollset::waitEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlibemb_1_1_int_array.html">IntArray</a> &amp;&#160;</td>
          <td class="paramname"><em>fdArray</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classlibemb_1_1_int_array.html">IntArray</a> &amp;&#160;</td>
          <td class="paramname"><em>eventArray</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>usTimeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>等待事件 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fdArray</td><td></td></tr>
    <tr><td class="paramname">eventArray</td><td></td></tr>
    <tr><td class="paramname">usTimeout</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_pollset_8h_source.html">Pollset.h</a></li>
<li>src/Pollset.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
